import useCommonStore from "@/store/common.js";
const commonStore = useCommonStore();

const chartStatics = {
  // chartSize: 48,
  emphasis: {
    disabled: false,
    focus: "series", // "series" : "none"
  },
  smooth: false,
  barMinHeight: 15,
  barItemBorderRadius: 8,
  lineLabelBorderRadius: 5, //[15, 0, 0, 15]
  lineWidth: 5,
  lineSymbolSize: 4,
  labelConfig: {
    show: true,
    // color: chartForeColor.value,
    fontWeight: "bold",
    fontFamily: "Consolas",
    fontSize: "14px",
  },
  barLineStyle: {
    color: commonStore.darkMode ? "rgba(255,255,255,0.5)" : "rgba(0,0,0,0.3)",
    type: "dotted",
    opacity: 1,
  },
  barWidth: 45,
  // barGap: 30,
  barCategoryGap: 0,
  animationDelay: function (idx) {
    return idx * 50 + 100;
  },
};

const chartDefaults = {
  modeSelect: "auto",
  showTotal: true,
  showAdvise: true,
};

export { chartStatics, chartDefaults };
